#include <cstdlib>
#include <iostream>

using namespace std;

int
main (int argc, char *argv[])
{
    cout << "Hello, ";

    if (argc == 1) {
        cout << "World";
    }
    else if (argc == 2) {
        cout << argv[1];
    }
    else {
        for (int x = 1; x < (argc - 1); x += 1) {
            cout << argv[x] << ", ";
        }
        cout << "and " << argv[argc-1];
    }
    cout << "!" << endl;

    // ``return 0`` implicit.
}
